package com.designpattern.creating.singleton;

/**
 * @Author chengzelee
 * @Date 2022/11/24 18:05
 * @Desc 懒汉单例，线程不安全
 */
public class Singleton_lazy_unsafe {

    private static Singleton_lazy_unsafe instance;

    public static Singleton_lazy_unsafe getInstance() {
        if (instance != null) {
            return instance;
        }
        instance = new Singleton_lazy_unsafe();
        return instance;
    }
}
